//
//  InvitationTopView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/11.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "InvitationTopView.h"

@implementation InvitationTopView

-(id)initWithFrame:(CGRect)aFrame inSuperView:(UIView *)aSuperView{
    if (self = [super initWithFrame:aFrame inSuperView:aSuperView]) {
        self.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
        //
        GLGWView * bankgroundView = [[GLGWView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(35), kHeightProportion_In_iPhoneTriploid(7), KScreenWidth - kWidthProportion_In_iPhoneTriploid(70), kHeightProportion_In_iPhoneTriploid(30)) inSuperView:self];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        bankgroundView.layer.cornerRadius = kHeightProportion_In_iPhoneTriploid(15);
        bankgroundView.layer.masksToBounds = YES;
        //
        GLGWImageView * searchImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(7), kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(15)) inSuperView:bankgroundView];
        searchImageView.backgroundColor = kRandomColor;
        //
        GLGWLabel * searchTextlabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(35), kHeightProportion_In_iPhoneTriploid(5), bankgroundView.width - kWidthProportion_In_iPhoneTriploid(50), kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:bankgroundView];
        searchTextlabel.text = @"输入卖家联系人手机号/店铺名";
        //手势
        UITapGestureRecognizer * tap_TopTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap_TopViewAction:)];
        tap_TopTap.numberOfTouchesRequired = 1;
        tap_TopTap.numberOfTapsRequired = 1;
        [bankgroundView addGestureRecognizer:tap_TopTap];
        bankgroundView.userInteractionEnabled = YES;
    }
    return self;
}

-(void)tap_TopViewAction:(UITapGestureRecognizer *)tap{
    if (self.Block_TapAction) {
        self.Block_TapAction();
    }
}

@end
